using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;


namespace jaam_butters.Ground
{
    /// <summary>
    /// This is a game component that implements IUpdateable.
    /// </summary>
    public class GoodGround : DrawableGameComponent
    {
        public static Texture2D sprite { get; private set; }
        SpriteBatch spriteBatch;
        Vector2 Position { get; set; }
        Game game;

        public GoodGround(Game g, Vector2 position,SpriteBatch sb)
            : base(g)
        {
            Position = position;
            spriteBatch = sb;
            game = g;
            LoadContent();
        }

        protected override void LoadContent()
        {
            //if (SpriteSheet == null) SpriteSheet = Game.Content.Load<Texture2D>("C:/Users/Mo/Desktop/EECS 495 2D game/jaam-butters/jaam-buttersContent/Agents/Jaam");
            sprite = game.Content.Load<Texture2D>("pebbles");
            //base.LoadContent();
        }

        public override void Draw(GameTime gameTime)
        {
            spriteBatch.Draw(sprite, Position, Color.White);
            //base.Draw(gameTime);
        }

        /// <summary>
        /// Allows the game component to update itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        public override void Update(GameTime gameTime)
        {
            // TODO: Add your update code here

            base.Update(gameTime);
        }
    }
}
